<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="content" class="col-lg-10 col-sm-10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a>
            </li>
            <li>
                <a href="#">View Subject</a>
            </li>
        </ul>
    </div>

    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <form  action="FilterSubjectAction.do" method="post">

                    <div class="box-header well" data-original-title="">
                        <h2>Filter Criteria</h2>



                    </div>
                    <div class="box-content">
                        <div class="control-group">
                            <div class="controls">
                                <label class="control-label" for="selectError">Select Branch</label>

                                <select id="branch_select" name="branch" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <c:forEach items="${applicationScope.li_allbranches}" var="branch">
                                        <option value="${branch.id}">${branch.name}</option>    
                                    </c:forEach>

                                </select> 
                                <br><br>
                                <label class="control-label" for="selectError">Select Semester</label>

                                <select id="semester_select" name="semester" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <c:forEach begin="1" end="8" var="i">
                                        <option  value="${i}">${i}</option>
                                    </c:forEach>


                            </div>

                        </div>

                    </div>

                    <p class="center col-md-5">
                        <input type="submit" class="btn btn-primary" value="GO">
                    </p>

                </form>
            </div>

        </div>
    </div>

    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>All Branch</h2>

                    <div class="box-icon">

                    </div>
                </div>
                <div class="box-content">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>Subject Id</th>
                                <th>Name</th>
                                <th>Lectures per week</th>
                                <th>Labs per week</th>

                                <th>Added By</th>
                                <th>Action</th>
                                <!--                                <th>Email</th>
                                                                <th>Contact</th>
                                -->
                            </tr>
                        </thead>
                        <tbody>


                            <c:forEach items="${applicationScope.page_li_allsubjects}" var="subject">
                                <tr id="tr_${subject.id}">

                                    <td class="center" id="td_name_${subject.id}">${subject.id}</td>
                                    <td class="center" id="td_name_${subject.id}">${subject.name}</td>

                                    <td class="center" id="td_name_${subject.id}">${subject.lecturesperweek}</td>
                                    <td class="center" id="td_name_${subject.id}">${subject.labsperweek}</td>
                                    <td class="center" id="td_name_${subject.id}">${subject.admin.fname}</td>
                                    <!--                            
                                    -->                                         <td class="center"><!--
                                        -->                                        <button class="label-success label label-default delete_button" id="delete_${subject.id}">Delete</button><!--
                                        -->                                    </td>
                                </tr>
                            </c:forEach>

                        </tbody>
                    </table>
                    <ul class="pagination pagination-centered">

                        <c:forEach begin="1" end="${sessionScope.pagelink}" var="i">
                            <li class="active">
                                <a href="PageAction.do?pageid=<c:out value="${i}"></c:out>&action=subject">${i}</a>
                                </li>
                        </c:forEach>


                    </ul>
                    <button><a href="add-subject.jsp">Add More Subjects.</a></button><!--
                </div>
            </div>
        </div>
                    <!--/span-->


                    <!--/span-->
                </div>
            </div>